version: '3.1'
services:
  odoo:
    build:
      context: ./odoo
    depends_on:
      - db
    ports:
      - "8069:8069"
    volumes:
      - odoo-web-data:/var/lib/odoo
      - ./etc:/etc/odoo:ro,z
      - ./repos:/mnt/repos:ro,z
  db:
    image: postgres:9-alpine
    ports:
      - "5050:5432"
    environment:
      - POSTGRES_PASSWORD=odoo
      - POSTGRES_USER=odoo
      - PGDATA=/var/lib/postgresql/data/pgdata
    volumes:
      - odoo-db-data:/var/lib/postgresql/data/pgdata
volumes:
  odoo-web-data:
  odoo-db-data:
